package day02;

import com.sun.security.jgss.GSSUtil;

public class DataTypeCastDemo {
    public static void main(String[] args) {
        //两种方式：自动类型转换、强制类型转换
        /*
        int a = 5;
        long b = a;
        int c = (int)b;

        long d = 5;
        double e = 5;
        System.out.println(e);

        long f = 10000000000L;
        int g = (int)f;
        System.out.println(f);

        double h = 25.987;
        int i = (int)h;
        System.out.println(i);
         */
        //两种规则
        byte b1 = 5;
        byte b2 = 6;
        byte b3 = (byte) (b1 + b2);

        System.out.println('2');
        System.out.println(2+2);
        System.out.println(2+'2');
        System.out.println('2'+'2');
    }
}
